package ai.people.platform.archives.intimacy;

import ai.people.core.grpc.lib.key.account.IntimacyServiceGrpc;
import ai.people.core.grpc.lib.key.account.Request;

import java.util.List;

/**
 * @author zhenglin
 * @date 2022/8/2
 */
public class IntimacyServiceFactory {

    public static List<?> getIntimacyResponse(IntimacyServiceGrpc.IntimacyServiceBlockingStub sub, Request grpcRequest, String type) {
        switch (type) {
            case "twitter":
                return sub.getTwitterIntimacy(grpcRequest).getResponseList();
            case "telegram":
                return sub.getTelegramIntimacy(grpcRequest).getResponseList();
            case "reddit":
                return sub.getRedditIntimacy(grpcRequest).getResponseList();
            default:
                break;
        }
        return null;
    }
}
